import {Component, OnInit} from '@angular/core';
import {EChartsOption} from "echarts";
import {DateUtil} from "../../util/DateUtil";
import {CommonService} from "../../service/base/common.service";
import {HttpCustomConfig} from "../../service/base/base.http.service";

@Component({
  selector: 'app-dash',
  templateUrl: './dash.component.html',
  styleUrls: ['./dash.component.less']
})
export class DashComponent implements OnInit {

  weatherTemp: string = '--';
  weather: string = '--';
  weatherWind: string = '--';
  todayStr: string = DateUtil.date2strYMD(new Date());
  weekStr: string = DateUtil.getWeekByDate(new Date);
  dateType: string = '--';
  openDays: string = '--';
  checkinTotalAmount: string = '--';
  fansAddAmount: string = '';
  fansTotalAmount: string = '--';
  dayAmount: string = '--';
  monthAmount: string = '--';
  yearAmount: string = '--';
  dayBasicKpiPercent: string = '--';
  dayChallengeKpiPercent: string = '--';
  dayChallengeKpiDiffAmount: string = '';
  monthBasicKpiPercent: string = '--';
  monthChallengeKpiPercent: string = '--';
  monthChallengeKpiDiffAmount: string = '';
  yearBasicKpiPercent: string = '--';
  yearChallengeKpiPercent: string = '--';
  yearChallengeKpiDiffAmount: string = '';

  checkinLineOptions: EChartsOption = {
    legend: {},
    tooltip: {},
    dataset: {source: []},
    xAxis: {type: 'category'},
    yAxis: {type: 'value'},
    series: [{type: 'line', smooth: true}, {type: 'line', smooth: true}],
  };
  checkinLineMergeOptions: EChartsOption = this.checkinLineOptions;
  checkinChartHttpConfig: HttpCustomConfig = {showLoading: false}

  constructor(private commonService: CommonService) {
  }

  ngOnInit(): void {
  }

}
